package com.example.mapper.dingdan;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.domain.dingdan;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface dingdanQuery extends BaseMapper<dingdan> {

    @Select("SELECT childrens_articles.id,title,category,fit,rent,freight,deposit,addres,phone,describes,imgurl1,imgurl2,imgurl3,leixin1,leixin2,leixin3,num,state,userid,reserve.leixin as leixin,reserve.starttime as starttime,reserve.overtime as overtime,reserve.number as number,reserve.feiyong as feiyong FROM childrens_articles,reserve where reserve.articlesid= childrens_articles.id and reserve.user_openid=${user_openid}")
    List<dingdan> findDd(String user_openid);

    @Select("SELECT childrens_articles.id,title,category,fit,rent,freight,deposit,addres,phone,describes,imgurl1,imgurl2,imgurl3,leixin1,leixin2,leixin3,num,state,userid,user_lease.leixin as leixin,user_lease.starttime as starttime,user_lease.overtime as overtime,user_lease.number as number,user_lease.feiyong as feiyong FROM childrens_articles,user_lease where user_lease.articlesid= childrens_articles.id and user_lease.user_openid=${user_openid}")
    List<dingdan> findlease(String user_openid);



}
